package com.red.star.wechat.data.mappers;

import com.red.star.wechat.data.core.base.MyMapper;
import com.red.star.wechat.data.entity.ConvertMoney;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface CouponMoneyMapper extends MyMapper<ConvertMoney> {

    @Select("SELECT * FROM  t_convert_money WHERE order_no=#{orderNo} or coupon_no=#{couponNo}")
    List<ConvertMoney> findConvertMoneyNo(@Param("orderNo") String orderNo, @Param("couponNo") String couponNo);

    @Select("SELECT * FROM  t_convert_money WHERE order_no=#{orderNo} or coupon_id=#{couponId}")
    List<ConvertMoney> getConvertMoneyNo(@Param("orderNo") String orderNo, @Param("couponId") Integer couponId);

    public List<String> findOldConvertByNoList(List<String> orderNoList);

}
